home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / AIncludes / OSAGeneric.a < prev    next >
Encoding:
Text File  |  1993-12-02  |  3.9 KB  |  113 lines  |  [TEXT/MPS ]

  1. ;////////////////////////////////////////////////////////////////////////////////
  2. ;// OPEN SCRIPTING ARCHITECTURE: Generic Component Interface
  3. ;////////////////////////////////////////////////////////////////////////////////
  4. ;// Copyright © 1992 Apple Computer, Inc. All rights reserved.
  5. ;// Authors: Jens Alfke, William Cook, Donn Denman, and Warren Harris
  6. ;////////////////////////////////////////////////////////////////////////////////
  7. ;// This interface defines a "generic scripting component."
  8. ;// The Generic Scripting Component allows automatic dispatch to a
  9. ;// specific scripting component that conforms to the OSA interface.
  10. ;// This component supports OSA, by calling AppleScript or some other 
  11. ;// scripting component.  Additionally it provides access to the default
  12. ;// and the user-prefered scripting component.
  13. ;////////////////////////////////////////////////////////////////////////////////
  14.  
  15.  IF &TYPE('__INCLUDINGOSAGENERIC__') = 'UNDEFINED' THEN
  16. __INCLUDINGOSAGENERIC__ SET 1
  17.  
  18.  IF &TYPE('__INCLUDINGOSA__') = 'UNDEFINED' THEN
  19.  INCLUDE 'OSA.a'
  20.  ENDIF
  21.  
  22. errOSAComponentMismatch    EQU    -1761    ; Parameters are from 2 different components
  23. errOSACantOpenComponent    EQU    -1762    ; Can't connect to scripting system with that ID
  24.  
  25. kGenericComponentVersion    EQU    $0100    ; Component version this header file describes
  26.  
  27. kGSSSelectGetDefaultScriptingComponent EQU    $1001    ; == kOSASelectComponentSpecificStart
  28. kGSSSelectSetDefaultScriptingComponent EQU    $1002
  29. kGSSSelectGetScriptingComponent    EQU    $1003
  30. kGSSSelectGetScriptingComponentFromStored EQU    $1004
  31. kGSSSelectGenericToRealID    EQU    $1005
  32. kGSSSelectRealToGenericID    EQU    $1006
  33. kGSSSelectOutOfRange    EQU    $1007
  34.  
  35. ;// get and set the default scripting component
  36. ;pascal OSAError 
  37. ;OSAGetDefaultScriptingComponent( ComponentInstance genericScriptingComponent,
  38. ;          ScriptingComponentSelector* scriptingSubType);
  39.     
  40.         MACRO
  41.         _OSAGetDefaultScriptingComponent
  42.         MOVE.L    #((4<<16)|kGSSSelectGetDefaultScriptingComponent),-(A7)
  43.         MOVEQ    #$0,D0
  44.         DC.W    $A82A    ; TB 002A
  45.         ENDM
  46.  
  47. ;pascal OSAError 
  48. ;OSASetDefaultScriptingComponent( ComponentInstance genericScriptingComponent,
  49. ;          ScriptingComponentSelector scriptingSubType );
  50.  
  51.         MACRO
  52.         _OSASetDefaultScriptingComponent
  53.         MOVE.L    #((4<<16)|kGSSSelectSetDefaultScriptingComponent),-(A7)
  54.         MOVEQ    #$0,D0
  55.         DC.W    $A82A    ; TB 002A
  56.         ENDM
  57.  
  58. ;// get a scripting component instance from its subtype code
  59. ;pascal OSAError 
  60. ;OSAGetScriptingComponent( ComponentInstance genericScriptingComponent,
  61. ;               ScriptingComponentSelector scriptingSubType,                 // in
  62. ;               ComponentInstance* scriptingInstance );
  63.  
  64.         MACRO
  65.         _OSAGetScriptingComponent
  66.         MOVE.L    #((8<<16)|kGSSSelectGetScriptingComponent),-(A7)
  67.         MOVEQ    #$0,D0
  68.         DC.W    $A82A    ; TB 002A
  69.         ENDM
  70.  
  71. ;// get a scripting component selector (subType) from a stored script
  72. ;pascal OSAError 
  73. ;OSAGetScriptingComponentFromStored( ComponentInstance genericScriptingComponent,
  74. ;             const AEDesc *scriptData,                         // in
  75. ;             ScriptingComponentSelector* scriptingSubType );
  76.  
  77.         MACRO
  78.         _OSAGetScriptingComponentFromStored
  79.         MOVE.L    #((8<<16)|kGSSSelectGetScriptingComponentFromStored),-(A7)
  80.         MOVEQ    #$0,D0
  81.         DC.W    $A82A    ; TB 002A
  82.         ENDM
  83.  
  84. ;// get a real component instance and script id from a generic id
  85. ;pascal OSAError 
  86. ;OSAGenericToRealID( ComponentInstance genericScriptingComponent,
  87. ;         OSAID *theScriptID,                                                // in/out
  88. ;         ComponentInstance *theExactComponent );
  89.  
  90.         MACRO
  91.         _OSAGenericToRealID
  92.         MOVE.L    #((8<<16)|kGSSSelectGenericToRealID),-(A7)
  93.         MOVEQ    #$0,D0
  94.         DC.W    $A82A    ; TB 002A
  95.         ENDM
  96.  
  97. ;// get a generic id from a real component instance and script id
  98. ;pascal OSAError 
  99. ;OSARealToGenericID( ComponentInstance genericScriptingComponent,
  100. ;         OSAID *theScriptID,                                                // in/out
  101. ;         ComponentInstance theExactComponent );
  102.  
  103.         MACRO
  104.         _OSARealToGenericID
  105.         MOVE.L    #((8<<16)|kGSSSelectRealToGenericID),-(A7)
  106.         MOVEQ    #$0,D0
  107.         DC.W    $A82A    ; TB 002A
  108.         ENDM
  109.  
  110.  ENDIF
  111. ;//////////////////////////////////////////////////////////////////////////////////////////////////////
  112.  
  113.